using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace Backend.JYD.AModel.Models.Mapping
{
    public class TaskBaseInfo_OldMap : EntityTypeConfiguration<TaskBaseInfo_Old>
    {
        public TaskBaseInfo_OldMap()
        {
            // Primary Key
            this.HasKey(t => t.Id);

            // Properties
            this.Property(t => t.CustNo)
                .HasMaxLength(20);

            this.Property(t => t.CustName)
                .IsRequired()
                .HasMaxLength(50);

            this.Property(t => t.RoleIds)
                .HasMaxLength(50);

            this.Property(t => t.EmpIds)
                .HasMaxLength(50);

            // Table & Column Mappings
            this.ToTable("TaskBaseInfo_Old");
            this.Property(t => t.Id).HasColumnName("Id");
            this.Property(t => t.IntentId).HasColumnName("IntentId");
            this.Property(t => t.CustNo).HasColumnName("CustNo");
            this.Property(t => t.CustName).HasColumnName("CustName");
            this.Property(t => t.TaskId).HasColumnName("TaskId");
            this.Property(t => t.TaskModelId).HasColumnName("TaskModelId");
            this.Property(t => t.StepId).HasColumnName("StepId");
            this.Property(t => t.TaskDetailId).HasColumnName("TaskDetailId");
            this.Property(t => t.RoleIds).HasColumnName("RoleIds");
            this.Property(t => t.EmpIds).HasColumnName("EmpIds");
            this.Property(t => t.Status).HasColumnName("Status");
            this.Property(t => t.Type).HasColumnName("Type");
            this.Property(t => t.CreateTime).HasColumnName("CreateTime");
            this.Property(t => t.UpdateTime).HasColumnName("UpdateTime");
            this.Property(t => t.OpId).HasColumnName("OpId");
            this.Property(t => t.InsertTime).HasColumnName("InsertTime");
        }
    }
}
